<template>
  <div>黑马92期--{{ count }}</div>
  <div>
    <button @click="updateCount">修改count</button>
  </div>
</template>

<script setup>
// 组合式API -- composition API
import { ref } from 'vue';

const count = ref(1);
const updateCount = () => {
  count.value++;
};
</script>

<!-- <script>
export default {
  // 选项式API
  data: function() {
    return {
      count: 1,
    };
  },
  methods: {
    updateCount() {
      this.count++;
    },
  },
};
</script> -->
